<template>
  <el-main style="padding: 20px;">
    <div class="table-box">
      <el-table :data="content" style="width: 100%">
        <el-table-column prop="content" label="题目"></el-table-column>
        <el-table-column prop="item" label="选择"></el-table-column>
        <el-table-column prop="answer" label="答案"></el-table-column>
        <el-table-column prop="analysis" label="解析"></el-table-column>
<!--        <el-table-column label="操作">
         <template slot-scope="scope">
            <el-button @click="setbianji(scope.row)" type="text" size="mini">编辑</el-button>
            <el-button type="text" size="mini" @click="deleteObj(scope.row)">删除</el-button>
          </template>
        </el-table-column> -->
      </el-table>
    </div>

  </el-main>
</template>


<script>
  export default{
    data(){
      return {
        data:[],
        content:[]
      }
    },
    mounted: function () {
      this.getData()
    },
    methods: {
    getData(){
      this.postRequest(`/back/practiceexams/getPracticeExam?examId=${this.$route.query.id}`).then(res => {
        this.data = res.data.data;
        let arr = res.data.data.content;
        for(let item in arr){
          //console.log(arr[item])
            for(let value in arr[item]){
              //console.log(arr[item][value])
              let list = arr[item][value];
              
              this.content.push(arr[item][value])
            }
        }
        //console.log(this.content)
      });
    }


    }
  }


</script>
